<?php

namespace common\rest\grid;

/**
 * LabelColumn displays a column of mark text content in a grid view.
 *
 * @author emhome <emhome@163.com>
 * @since 2.0
 */
class CellColumn extends DataColumn {

    public $format = 'cell';
    public $cellOptions = [];

    /**
     * Returns the data cell value.
     * @param mixed $model the data model
     * @param mixed $key the key associated with the data model
     * @param int $index the zero-based index of the data model among the models array returned by [[GridView::dataProvider]].
     * @return string the data cell value
     */
    public function renderExtands() {
        if (empty($this->cellOptions)) {
            return [];
        }
        return [
            'cellOptions' => $this->cellOptions
        ];
    }

//public $value = function (){
//
//};
}
